module.exports = {
  type: 'bottomTab',
  tabMode: 'fixed',
  actions: [
    {
      title: '搜索',
      onClick: async function() {
        let keyword = await $input.prompt({
          title: '你想搜啥咧',
          value: ''
        })
        $router.to($route('other/list', { keyword: encodeURI(keyword) }))
      }
    }
  ],
  fetch() {
    return [
      {
        thumb: $icon('personal_video', 'black'),
        title: '电视剧',
        route: $route('other/list', { tid: 2 })
      },
      {
        thumb: $icon('movie', 'black'),
        title: '电影',
        route: $route('other/list', { tid: 1 })
      },
      {
        thumb: $icon('music_video', 'black'),
        title: '综艺',
        route: $route('other/list', { tid: 3 })
      },
      {
        thumb: $icon('toys', 'black'),
        title: '动漫',
        route: $route('other/list', { tid: 4 })
      }
    ]
  },
  onClick(item) {
    $ui.toast(`Clicked ${item.title}`)
  }
}
